%The function is the answer to the first part of P3b.
%iterate the map for a few initial conditions x0. Eventually,all solutions should go to zero (fixed point). 
%Plot f (x) = rx(1-x) vs. x and the diagonal y = x on the same plot
function P3a_Part1 (x0,t)
r=0.75;                                      % Consider the condition that r is equal to 0.75
figure;
y=0:0.0001:1;                                % Use y to represent x avoiding the overlap
z1=r.*y.*(1-y);                              % The function of f (x) = rx(1-x)
plot(y,z1,'b',y,y,':k');                     % Plot f (x) = rx(1-x) vs. x and the diagonal y = x on the same plot
cobweb(x0,r,t);                              % Use the Function cobweb to plot the cobweb

end

